import {
	CHANGE_INPUT_VALUE,
	ADD_TODO_ITEM,
	DELETE_TODO_ITEM,
	INIT_LIST,
	GET_TODO_LIST
} from './ActionTypes';

import axios from 'axios';

export const getInputChangeAction = (value) => ({
	type: CHANGE_INPUT_VALUE,
	value
})

export const getAddTodoAction = () => ({
	type: ADD_TODO_ITEM
})

export const getDeleteTodoAction = (index) => ({
	type: DELETE_TODO_ITEM,
	index
})

export const getInitListAction = (data) => ({
	type: INIT_LIST,
	data
})

export const getTodoList = () => ({
	type: GET_TODO_LIST
})